package com.karaoke.android.data.domain

import io.realm.RealmList
import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
import org.simple.eventbus.EventBus

/**
 * Created by allen on 2017/4/24.
 */
open class PlayList : RealmObject()
{
    @PrimaryKey
    var id = "play_list"
    var current: Song? = null
        set(value)
        {
            if (value != null && field != value)
            {
                EventBus.getDefault().post(value, "currentChanged")
            }
            field = value
        }
    var list: RealmList<Song> = RealmList()
    var endList: RealmList<Song> = RealmList()
}